package com.spic.business.bp.controller;

import com.spic.business.bp.domain.BpInfoAlarm;
import com.spic.business.bp.service.BpInfoService;
import com.spic.common.core.web.controller.BaseController;
import com.spic.common.core.web.domain.AjaxResult;
import com.spic.common.core.web.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 290512
 * @create 2022-07-25 15:57
 */
@RestController
@RequestMapping("/bpinfo")
public class BpInfoAlarmController   extends BaseController
{
    @Autowired
    private BpInfoService bpInfoService;


    @GetMapping("/list")
    public TableDataInfo list(BpInfoAlarm bpInfoAlarm)
    {
        startPage();
        List<BpInfoAlarm> list = bpInfoService.selectBpInfoAlarmList(bpInfoAlarm);
        return getDataTable(list);
    }
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") String id)
    {
        return AjaxResult.success(bpInfoService.selectBpInfoAlarmById(id));
    }

}
